package com.woniuxy;

import com.woniuxy.config.websocket.WebSocketServer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@MapperScan("com.woniuxy.mapper")
@EnableTransactionManagement
@ImportResource("classpath:transaction.xml")
@EnableElasticsearchRepositories
public class YuekeApplication{

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(YuekeApplication.class, args);
        WebSocketServer.setApplicationContext(context);
    }
}
